{template 'tpl_header'}

{if !empty($insureds) }
{loop $insureds $insured}
<div class="insured-list" onclick="insurance({$insured['id']});">
    <div class="insured-info">
        <div class="insured-info_left">
            <!--<div class="insured-info_btn">
                <label><input type="radio" class="option-input radio" name="Addselt"></label>
            </div>-->
            <div class="insured-info_detail">
                <div>
                    {$insured['real_name']}
                </div>
                <div class="insured-info_certificate">
                    {php echo ($insured['certificate_type'] == '1')?'护照':'身份证'; }：{$insured['certificate_no']}
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="insured-info_right">
            <a href="{php echo url('entry', array('m' => 'vj_bontrip','do' => 'insured','op' => 'post','adult_number' => $adult_number,'child_number' => $child_number,'insurance_id' => $insurance_id,'start_day' => $start_day,'finish_day' => $finish_day,'index' => $index,'type' => $type,'id' => $insured['id']),true);}">
                <i class="iconfont icon-icon-xiugai insured-info_right_icon"></i>
            </a>
        </div>
        <div class="clear"></div>
    </div>
    <div>
    </div>
</div>
{/loop}
{else}
<div id="list_null" class="weui-loadmore weui-loadmore_line">
    <span class="weui-loadmore__tips">暂无数据</span>
</div>
{/if}

<div class='insured_btn'>
    <a href="{php echo url('entry', array('m' => 'vj_bontrip','do' => 'insured','op' => 'post','adult_number' => $adult_number,'child_number' => $child_number,'insurance_id' => $insurance_id,'start_day' => $start_day,'finish_day' => $finish_day,'index' => $index,'type' => $type),true);}"
       class="weui-btn weui-btn_primary">新增被保人</a>
</div>

{template 'tpl_footer'}
<script>
    function insurance(id) {
        var url = "{php echo url('entry', array('m' => 'vj_bontrip','do' => 'insurance','op' => 'detail','id' => $insurance_id,'adult_number' => $adult_number,'child_number' => $child_number,'start_day' => $start_day,'finish_day' => $finish_day,'type' => $type,'index' => $index),true);}";
        url += "&insured_id=" + id;
        window.location.href = url;
    }
</script>